<template>
	<div class="box" >
		<server-header></server-header>
		<div class="content">
			<server-methods></server-methods>
			<server-question></server-question>
		</div>
	</div>
</template>

<script>
import ServerHeader from "./serverHeader";
import ServerMethods from "./serverMethods";
import ServerQuestion from "./serverQuestion";
import {mapGetters} from "vuex";
import {getPageTree, initDomTree} from "../../utils/getPageTree";
import axios from "axios";
	export default {
	  	name: 'hello',
	  	data () {
	    	return {
				msg: '这是新增地址页面',
	            page: "addAddress",
			}
		},
		computed: {
			...mapGetters([
				"getDomTree"
			]),
			pageTree () {
				return getPageTree(this, this.page);
			}
		},
		components: {
			"server-header": ServerHeader,
	        "server-methods": ServerMethods,
	        "server-question": ServerQuestion,
	    },
	    methods: {
	        getData() {
				console.log(123456);
	        },    
	    },
		created () {
			
		},
		mounted () {
			// initDomTree(this.getDomTree[this.page]);
			
		},
		updated() {
			//页面更新完毕
			 initDomTree(this.getDomTree[this.page]);
		}
	}
</script>

<style scoped="scoped">
	.box{
		width: 100%;
	    height: 100%;
	    display: flex;
	    flex-direction: column;
	    justify-content: space-between;
	}
	.content{
		flex:1;
		overflow-y:auto;
	}
</style>